package com.zp.self.module.system.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author By ZengPeng
 * @Description
 * @date in  2021/1/11 11:01
 * @Modified By
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Resource
    RestTemplate restTemplate;

    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public Object hi(String name){
        return restTemplate.getForObject("http://sys-security/hi?name="+name,String.class);
    }
}
